package com.azunitech.apm.bundles.shell.commands;

import java.io.PrintStream;
import org.osgi.framework.BundleContext;
import com.azunitech.apm.bundles.shell.BasicCommand;

public class CommandEXIT extends BasicCommand<BundleContext>{
	private static final String CMD_KEY = "exit";
	private static final String CMD_DESC = "Exit from telnet console";

	public String getKey() {
		return CommandEXIT.CMD_KEY;
	}

	public String getDesc() {
		return CommandEXIT.CMD_DESC;
	}

	public void exec(String args, PrintStream out, PrintStream err)
			throws Exception {
		String id = args.substring(5);
		if ( id == null || id.length() == 0)
		{
			out.close();
		}
	}
}
